<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: ailayer_template.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ailayer__template_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ailayer_template.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>[DEPRECATED] This file acts as a reference for new layer structures. Some of the shown functions are mandatory, some are optional.  
<a href="#details">More...</a></p>

<p><a href="ailayer__template_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structailayer__template.html">ailayer_template</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template for general AIfES layers.  <a href="structailayer__template.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a6936bc92fd214fa57f8fa766ac065581"><td class="memItemLeft" align="right" valign="top"><a id="a6936bc92fd214fa57f8fa766ac065581"></a>
typedef struct <a class="el" href="structailayer__template.html">ailayer_template</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ailayer_template_t</b></td></tr>
<tr class="separator:a6936bc92fd214fa57f8fa766ac065581"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a877916ceae42ff18b06bcbae07ee0908"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a877916ceae42ff18b06bcbae07ee0908">ailayer_template</a> (<a class="el" href="structailayer__template.html">ailayer_template_t</a> *layer, <a class="el" href="structailayer.html">ailayer_t</a> *input_layer)</td></tr>
<tr class="memdesc:a877916ceae42ff18b06bcbae07ee0908"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the given layer struct - <b>mandatory</b>  <a href="ailayer__template_8h.html#a877916ceae42ff18b06bcbae07ee0908">More...</a><br /></td></tr>
<tr class="separator:a877916ceae42ff18b06bcbae07ee0908"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acee3a4d7c24c145edd2adc193a2986d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#acee3a4d7c24c145edd2adc193a2986d4">ailayer_template_forward</a> (<a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:acee3a4d7c24c145edd2adc193a2986d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the forward path for given layer - <b>mandatory</b>  <a href="ailayer__template_8h.html#acee3a4d7c24c145edd2adc193a2986d4">More...</a><br /></td></tr>
<tr class="separator:acee3a4d7c24c145edd2adc193a2986d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5752cd98ed4d72cc9b785e9b62442b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#af5752cd98ed4d72cc9b785e9b62442b3">ailayer_template_backward</a> (<a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:af5752cd98ed4d72cc9b785e9b62442b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the backward (training) path for the given layer - <b>depends on usability in training</b>  <a href="ailayer__template_8h.html#af5752cd98ed4d72cc9b785e9b62442b3">More...</a><br /></td></tr>
<tr class="separator:af5752cd98ed4d72cc9b785e9b62442b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a187b2d82e879cd883f94c18b85cd6d5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a187b2d82e879cd883f94c18b85cd6d5a">ailayer_template_calc_result_shape</a> (<a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:a187b2d82e879cd883f94c18b85cd6d5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the shape of the result tensor.  <a href="ailayer__template_8h.html#a187b2d82e879cd883f94c18b85cd6d5a">More...</a><br /></td></tr>
<tr class="separator:a187b2d82e879cd883f94c18b85cd6d5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a567a02d0b5013e1dbec32751415a4c75"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a567a02d0b5013e1dbec32751415a4c75">ailayer_template_sizeof_paramem</a> (const <a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:a567a02d0b5013e1dbec32751415a4c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate and return the parameter memory size needed for this layer - <b>mandatory for hidden layers</b>  <a href="ailayer__template_8h.html#a567a02d0b5013e1dbec32751415a4c75">More...</a><br /></td></tr>
<tr class="separator:a567a02d0b5013e1dbec32751415a4c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f438a2288e4fd51ffac82ebbc048ff0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a7f438a2288e4fd51ffac82ebbc048ff0">ailayer_template_set_paramem</a> (<a class="el" href="structailayer.html">ailayer_t</a> *self, void *memory_ptr)</td></tr>
<tr class="memdesc:a7f438a2288e4fd51ffac82ebbc048ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distribute provided memory to the parameter pointers - <b>mandatory for hidden layers</b>  <a href="ailayer__template_8h.html#a7f438a2288e4fd51ffac82ebbc048ff0">More...</a><br /></td></tr>
<tr class="separator:a7f438a2288e4fd51ffac82ebbc048ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af928b71fdfe94a4e5bed3df2fc1f5f37"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#af928b71fdfe94a4e5bed3df2fc1f5f37">ailayer_template_sizeof_trainmem</a> (const <a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:af928b71fdfe94a4e5bed3df2fc1f5f37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate and return the necessary memory size needed by this layer for training - <b>mandatory for hidden layers</b>  <a href="ailayer__template_8h.html#af928b71fdfe94a4e5bed3df2fc1f5f37">More...</a><br /></td></tr>
<tr class="separator:af928b71fdfe94a4e5bed3df2fc1f5f37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23a312f2bbe3a375c3f9531943e1aa99"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a23a312f2bbe3a375c3f9531943e1aa99">ailayer_template_set_trainmem</a> (<a class="el" href="structailayer.html">ailayer_t</a> *self, void *memory_ptr)</td></tr>
<tr class="memdesc:a23a312f2bbe3a375c3f9531943e1aa99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distribute provided memory to the training gradients pointers - <b>mandatory for hidden layers</b>  <a href="ailayer__template_8h.html#a23a312f2bbe3a375c3f9531943e1aa99">More...</a><br /></td></tr>
<tr class="separator:a23a312f2bbe3a375c3f9531943e1aa99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15aae05c03815f718ceec7017f3a52bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__template_8h.html#a15aae05c03815f718ceec7017f3a52bd">ailayer_template_print_specs</a> (const <a class="el" href="structailayer.html">ailayer_t</a> *self)</td></tr>
<tr class="memdesc:a15aae05c03815f718ceec7017f3a52bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print the layer specification.  <a href="ailayer__template_8h.html#a15aae05c03815f718ceec7017f3a52bd">More...</a><br /></td></tr>
<tr class="separator:a15aae05c03815f718ceec7017f3a52bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a22c2e7fdb8c727c7f75680691b0849b8"><td class="memItemLeft" align="right" valign="top"><a id="a22c2e7fdb8c727c7f75680691b0849b8"></a>
const <a class="el" href="structaicore__layertype.html">aicore_layertype_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>ailayer_template_type</b></td></tr>
<tr class="separator:a22c2e7fdb8c727c7f75680691b0849b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>[DEPRECATED] This file acts as a reference for new layer structures. Some of the shown functions are mandatory, some are optional. </p>
<dl class="section version"><dt>Version</dt><dd>2.2.0 </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2020-2023 Fraunhofer Institute for Microelectronic Circuits and Systems. All rights reserved.<br  />
<br  />
 AIfES is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br  />
<br  />
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.<br  />
<br  />
 You should have received a copy of the GNU Affero General Public License along with this program. If not, see <a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>. </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a877916ceae42ff18b06bcbae07ee0908"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a877916ceae42ff18b06bcbae07ee0908">&#9670;&nbsp;</a></span>ailayer_template()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structailayer.html">ailayer_t</a>* <a class="el" href="structailayer__template.html">ailayer_template</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer__template.html">ailayer_template_t</a> *&#160;</td>
          <td class="paramname"><em>layer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>input_layer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the given layer struct - <b>mandatory</b> </p>
<p>Initializes and sets all parameters needed by the layer structure.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*layer</td><td>The layer to initialize. </td></tr>
    <tr><td class="paramname">*input_layer</td><td>The layer that provides the inputs to the initialized layer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the (successfully) initialized layer structure. </dd></dl>

</div>
</div>
<a id="af5752cd98ed4d72cc9b785e9b62442b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5752cd98ed4d72cc9b785e9b62442b3">&#9670;&nbsp;</a></span>ailayer_template_backward()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_backward </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the backward (training) path for the given layer - <b>depends on usability in training</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>Layer to calculate the backward path for. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a187b2d82e879cd883f94c18b85cd6d5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a187b2d82e879cd883f94c18b85cd6d5a">&#9670;&nbsp;</a></span>ailayer_template_calc_result_shape()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_calc_result_shape </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the shape of the result tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>Layer to calculate the resulting shape for. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acee3a4d7c24c145edd2adc193a2986d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acee3a4d7c24c145edd2adc193a2986d4">&#9670;&nbsp;</a></span>ailayer_template_forward()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_forward </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the forward path for given layer - <b>mandatory</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>Layer to calculate the forward path for. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a15aae05c03815f718ceec7017f3a52bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15aae05c03815f718ceec7017f3a52bd">&#9670;&nbsp;</a></span>ailayer_template_print_specs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_print_specs </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Print the layer specification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>The layer to print the specification for </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7f438a2288e4fd51ffac82ebbc048ff0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f438a2288e4fd51ffac82ebbc048ff0">&#9670;&nbsp;</a></span>ailayer_template_set_paramem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_set_paramem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>memory_ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Distribute provided memory to the parameter pointers - <b>mandatory for hidden layers</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>The layer to set the memory fields for. </td></tr>
    <tr><td class="paramname">*memory_ptr</td><td>Pointer to the buffer provided for the layer parameters. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a23a312f2bbe3a375c3f9531943e1aa99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23a312f2bbe3a375c3f9531943e1aa99">&#9670;&nbsp;</a></span>ailayer_template_set_trainmem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ailayer_template_set_trainmem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>memory_ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Distribute provided memory to the training gradients pointers - <b>mandatory for hidden layers</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>The layer to set the memory fields for. </td></tr>
    <tr><td class="paramname">*memory_ptr</td><td>Pointer to the buffer provided for the layer gradients. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a567a02d0b5013e1dbec32751415a4c75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a567a02d0b5013e1dbec32751415a4c75">&#9670;&nbsp;</a></span>ailayer_template_sizeof_paramem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ailayer_template_sizeof_paramem </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate and return the parameter memory size needed for this layer - <b>mandatory for hidden layers</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>The layer to calculate the parameter memory size for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Calculated parameter memory size in bytes. </dd></dl>

</div>
</div>
<a id="af928b71fdfe94a4e5bed3df2fc1f5f37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af928b71fdfe94a4e5bed3df2fc1f5f37">&#9670;&nbsp;</a></span>ailayer_template_sizeof_trainmem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ailayer_template_sizeof_trainmem </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate and return the necessary memory size needed by this layer for training - <b>mandatory for hidden layers</b> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*self</td><td>The layer to calculate the gradient memory size for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Calculated gradient memory size in bytes. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_90008ee2b0f86999412b56217da88d54.html">base</a></li><li class="navelem"><a class="el" href="dir_ad1f3f314a3dbbd36ea1eb350865d78d.html">ailayer</a></li><li class="navelem"><a class="el" href="ailayer__template_8h.html">ailayer_template.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
